package com.wty.order.service.impl;

import com.wty.order.pojo.Order;
import com.wty.order.mapper.OrderMapper;
import com.wty.order.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author wty
 * @since 2020-04-28
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public boolean deleteById(Serializable id) {
        int count = orderMapper.deleteById(id);
        return count != 0;
    }

    @Override
    public boolean deleteBatchById(List<Long> ids) {
        int count = orderMapper.deleteBatchIds(ids);
        return count != 0;
    }
}
